//
// Created on 2024/9/5.
//
// Node APIs are not fully supported. To solve the compilation error of the
// interface cannot be found, please include "napi/native_api.h".

#pragma once

#include <string>
#include <aki/jsbind.h>
#include "api/video/video_render_interface.h"

namespace ohosrtc {

class NJSVideoRender {
 public:
  NJSVideoRender(std::shared_ptr<webrtc::VideoRenderInterface> video_render);

  void DrawYuvFile(napi_value rawManager, std::string fileName);
  void DrawYuvBuffer(int width, int height, aki::ArrayBuffer buffer);
  void ClearColor(std::vector<float> rgba_color);
  void Release();

 private:
  std::shared_ptr<webrtc::VideoRenderInterface> cpp_impl_;
};

using NJSVideoRenderPtr = std::shared_ptr<NJSVideoRender>;
}
